<template>
  <div id="youQuanMsg">
    <img
      src="https://sit-tsyx-zsy.oss-cn-shenzhen.aliyuncs.com/userfiles/fileupload/202104/1386976044863447042.png"
      alt=""
      @click="toOtherPage()"
    />
    <img
      src="https://tsyx-rights-and-interests.oss-cn-hangzhou.aliyuncs.com/img/vipBanner.png"
      alt=""
      @click="toOtherPage()"
    />
    <img
      src="https://tsyx-rights-and-interests.oss-cn-hangzhou.aliyuncs.com/img/cardRule.png"
      alt=""
      @click="toRoule(1)"
    />
  </div>
</template>

<script>
export default {
  data() {
    return {
      userMsg: {},
    };
  },
  created() {
    this.userMsg = JSON.parse(window.localStorage.getItem("userMsg"));
  },
  methods: {
    toOtherPage() {
      if (!window.localStorage.getItem("phone")) {
        this.$router.push({ name: "getUser",query:{spid: 'youQuanMsg'} });
      }
      if (this.userMsg.userType == 0) {
        this.$router.push({ name: "poster" });
        return;
      }
    },
    toRoule(id) {
      this.$router.push({
        name: "roule",
        query: {
          id,
        },
      });
    },
  },
};
</script>

<style lang="scss" scoped>
#youQuanMsg {
  text-align: center;
  img {
    width: 95%;
    margin: 0.2rem 0;
  }
}
</style>